#wxWidgets build related stuff
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
SET(WXW_USE_DEBUG OFF)
SET(WXW_USE_UNICODE ON)

IF (WIN32)
	SET(WXW_USE_SHARED OFF)
ELSE (WIN32)
	SET(WXW_USE_SHARED ON)
ENDIF (WIN32)


SET(WXW_USE_UNIV OFF)
SET(WXW_USE_MONO OFF)
SET(WXWIDGETS_USE_MEDIA ON)
SET(WXW_FILE_VERSION "28")
SET(WXW_VERSION "2.8")

#CMake Options
SET(CMAKE_VERBOSE_MAKEFILE TRUE)

#Additional libraries
INCLUDE (cmake/FindwxW.cmake)

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}${WXWIDGETS_CXX_FLAGS}")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}${WXWIDGETS_EXE_LINKER_FLAGS}")

ADD_DEFINITIONS( ${WXWIDGETS_DEFINITIONS} ${PROJECT_DEFINITIONS} )

#
# The include dirs
#
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/images)
# Add project include paths as a separated list
SET(PROJECT_INCLUDE_PATH_LIST ${PROJECT_INCLUDE_PATH})
SEPARATE_ARGUMENTS(PROJECT_INCLUDE_PATH_LIST)
INCLUDE_DIRECTORIES(${PROJECT_INCLUDE_PATH_LIST})
INCLUDE_DIRECTORIES(${WXWIDGETS_INCLUDE_DIR})

#
# This is needed to tell CMake what directories contain the libraries we need. This will 
# allow us to just specify the lib files without prepending them with a full path to that
# library
#
LINK_DIRECTORIES( ${WXWIDGETS_LINK_DIRECTORIES} )
# Add project dirs as a separated list
SET(PROJECT_LINK_DIRECTORIES_LIST ${PROJECT_LINK_DIRECTORIES})
SEPARATE_ARGUMENTS(PROJECT_LINK_DIRECTORIES_LIST)
LINK_DIRECTORIES( ${PROJECT_LINK_DIRECTORIES_LIST} )

# sources of siprog
SET( PROJECT_SOURCE_FILES siapp.cpp mframe.cpp keycatcher.cpp sigamer.cpp
    dlgsetscore.cpp)

#executable module of tmpled
ADD_EXECUTABLE (siprog WIN32 ${PROJECT_SOURCE_FILES})

#
# Here we specify what libraries are linked to our project
#
# First, add the WX libs
TARGET_LINK_LIBRARIES(siprog ${WXWIDGETS_LIBRARIES})
# Then, we add the project specific libs
SET(PROJECT_LIBRARIES_LIST ${PROJECT_LIBRARIES})
# Make the project libs a list so CMake will do the right things
SEPARATE_ARGUMENTS(PROJECT_LIBRARIES_LIST)
TARGET_LINK_LIBRARIES(siprog ${PROJECT_LIBRARIES_LIST})

